/*
 * @Descripttion: 说明
 * @Author: ZXS
 * @Date: 2022-09-09 14:36:49
 * @LastEditors: ZXS
 * @LastEditTime: 2022-09-09 17:01:07
 */
import request from '@/utils/request'

export function login(data) {
  const formData = new FormData()
  for (var key in data) {
    formData.append(key, data[key])
  }
  return request({
    url: '/api/account/login',
    method: 'post',
    data: formData
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
